const _ = require("lodash");

// 格式化输出
function formatFrequency(frequency) {
  let formatted = {};
  _.forEach(frequency, (count, length) => {
    formatted[length] = count;
  });
  return formatted;
}

module.exports = formatFrequency;
